<include file="Public:header" />

<div id="home">

    <div id="header">

        <div style="height:28px; padding-top:10px; background:url(__PUBLIC__/Front/images/xy.png) 10px 8px no-repeat" class="logo"><span onclick=" history.go(-1);">&nbsp;</span></div>

        <div class="shoptitle"><span>产品列表</span></div>

        <include file="Public:righttop" />

    </div>

</div>

<div id="main">

    <include file="Public:procat" />

    <!--搜索模块-->
    <form id="form1" name="form1" method="post" action='{:U("Goods/search")}'>

        <div class="index-search">

            <div class="index-input">

                <input name="keyword" value="{$keyword}" placeholder='请输入搜索关键字' />

                <button type="button" onclick="checKeyword()">筛 选</button>
            </div>

        </div>

    </form>

    <script>

        function checKeyword() {

            var keyword = $('input[name = keyword]').val();

            if ((keyword == '') || (keyword == '请输入搜索关键字')) {
//                jAlert('您好，请输入搜索内容。', '');
                return;
            }

            $('#form1').submit();

        }
    </script>

    <style>

        input,button{padding: 0;margin: 0;}

        .index-search{width: 100%; margin: 0 auto; }

        .index-input{ margin:0 auto;border: 1px solid #c8c8c8; position: relative; margin:5px 0; background: #ffffff none repeat scroll 0 0; border-radius: 5px;  background: rgb(255, 255, 255) url(__PUBLIC__/front/images/search/search.png) no-repeat 3% center; background-size: 20px 20px;}

        .index-input input{width:90%;line-height: 34px; border: none; margin-left: 10%;  outline:none}

        .index-input button{position: absolute;right: -1px;height: 36px;background: #F70808;color: #ffffff; border: none; top: -1px; border-radius: 3px; border-radius: 0 5px 5px 0; padding: 4px;}

    </style>
    <!--end 搜索模块-->

    <ul class="goodslists">

        <empty name="data">

            <li style="padding-top: 60px; padding-bottom: 60px; font-size: 16px; text-align: center;  color:#666">
                没有查找到搜索内容
            </li>

            <else/>

            <volist name="data" id="sg">

                <li style="width:50%; float:left; position:relative">

                    <div style="padding:4px;">

                        <a style="background:#fff; padding:5px; display:block;">

                            <div style=" height:150px; overflow:hidden; text-align:center;">
                                <img alt="{$sg.title}" style="max-width:99%;display:inline;" src="{$sg.cover|get_cover}">
                            </div>

                            <p style="line-height:20px; height:20px; overflow:hidden; text-align:center">{$sg.title}</p>

                            <p style="line-height:24px; height:24px; overflow:hidden;"><span style="float:left">惊喜价:</span><b style="font-size:14px; float:left; padding-left:3px;" class="price">￥{$sg.price}</b></p>

                            <p style="line-height:20px; height:20px; overflow:hidden; color:#999999"><del>市场价&nbsp;&nbsp;￥{$sg.origin_price}</del></p>

                        </a>

                    </div>

                    <a href="{:U('Goods/detail',array('id'=> $sg['id']))}"><span class="buyfals">立即购买</span></a>

                </li>

            </volist>

        </empty>

        <div class="clear"></div>

    </ul>

    <div class="clear10"></div>

</div>

<include file="Public:footer" />